package day1031.demo02;

/**
 * @program: qy158
 * @description:
 * @author: 闫克起2
 * @create: 2022-10-31 10:17
 **/
public class Test {
    public static void main(String[] args) {
        //0.创建任务对象
        MyRunnable task1=new MyRunnable();
        //1.创建线程对象
        Thread t1=new Thread(task1);
        //开启线程，会执行Runnable中的run方法
        t1.start();
        for (int i = 0; i <20 ; i++) {
            System.out.println(Thread.currentThread().getName()+"~~~~~~~~~~~~"+i);
        }
    }
}
